package streamforce.crypto.message;

import java.io.Serializable;

//sent from the owner to the cloud, to initialize AC instance
//a simple price selection query uses this type of message
public class PolicyMessage implements Serializable{
	private static final long serialVersionUID = 1L;

	public static final int SELECT_PRICE = 0, SELECT_VOLUME = 1,
			SELECT_ALL = 2;
	
	//what sort of query the following stream supports
	public static final int SIMPLE_QUERY = 0, AGG_QUERY_1 = 1, AGG_QUERY_2 = 2,
			AGG_QUERY_3 = 3, JOIN_QUERY = 4;
	private int selectType, queryType, windowSize; 
	private int[] streamIds, userIds; 
	private byte[][] pubK, tK, detK, decK, wK;
	private String queryExpression;
	private int otherUserId; 
	
	public PolicyMessage(int[] streamIds, int[] userIds, byte[][] pubK, byte[][] tK,
			byte[][] detK, byte[][] decK, byte[][] wK, int windowSize,
			int selectType, int queryType, String queryExpression) {
		super();
		this.streamIds = streamIds;
		this.userIds = userIds;
		this.pubK = pubK;
		this.tK = tK;
		this.detK = detK;
		this.decK = decK; 
		this.wK = wK; 
		this.windowSize = windowSize; 
		this.selectType = selectType;
		this.queryType = queryType; 
		this.queryExpression = queryExpression;		
	}

	
	
	public int getOtherUserId() {
		return otherUserId;
	}



	public void setOtherUserId(int otherUserId) {
		this.otherUserId = otherUserId;
	}



	public int[] getUserIds() {
		return this.userIds;
	}


	public void setUserIds(int[] userId) {
		this.userIds = userId;
	}


	public int getWindowSize() {
		return windowSize;
	}


	public void setWindowSize(int windowSize) {
		this.windowSize = windowSize;
	}


	public byte[][] getwK() {
		return wK;
	}


	public void setwK(byte[][] wK) {
		this.wK = wK;
	}


	public int[] getStreamIds() {
		return streamIds;
	}

	public void setStreamIds(int[] streamId) {
		this.streamIds = streamId;
	}

	public int getSelectType() {
		return selectType;
	}

	public void setSelectType(int selectType) {
		this.selectType = selectType;
	}

	public int getQueryType() {
		return queryType;
	}

	public void setQueryType(int queryType) {
		this.queryType = queryType;
	}

	public byte[][] getPubK() {
		return pubK;
	}

	public void setPubK(byte[][] pubK) {
		this.pubK = pubK;
	}

	public byte[][] gettK() {
		return tK;
	}

	public void settK(byte[][] tK) {
		this.tK = tK;
	}

	public byte[][] getDetK() {
		return detK;
	}

	public void setDetK(byte[][] detK) {
		this.detK = detK;
	}

	public byte[][] getDecK() {
		return decK;
	}

	public void setDecK(byte[][] decK) {
		this.decK = decK;
	}

	public String getQueryExpression() {
		return queryExpression;
	}

	public void setQueryExpression(String queryExpression) {
		this.queryExpression = queryExpression;
	}
		
}
